package com.dianqiu.common.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import com.dianqiu.base.bean.BaseTO;

/**
 * DqHandicapType entity. @author David Dai
 */
@Entity
@Table(name = "dq_handicap_type", catalog = "dq_dev")
public class DqHandicapTypeTO extends BaseTO implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Integer hdpTypeId;
	private String type;
	private String description;
	private Set<DqHandicapTO> dqHandicaps = new HashSet<DqHandicapTO>(0);
	private Set<DqHandicapHistTO> dqHandicapHists = new HashSet<DqHandicapHistTO>(0);

	@Id
	@Column(name = "HDP_TYPE_ID", unique = true, nullable = false)
	public Integer getHdpTypeId() {
		return this.hdpTypeId;
	}

	public void setHdpTypeId(Integer hdpTypeId) {
		this.hdpTypeId = hdpTypeId;
	}

	@Column(name = "TYPE", nullable = false, length = 100)
	public String getType() {
		return this.type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@Column(name = "DESCRIPTION", length = 200)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "dqHandicapType")
	public Set<DqHandicapTO> getDqHandicaps() {
		return this.dqHandicaps;
	}

	public void setDqHandicaps(Set<DqHandicapTO> dqHandicaps) {
		this.dqHandicaps = dqHandicaps;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "dqHandicapType")
	public Set<DqHandicapHistTO> getDqHandicapHists() {
		return this.dqHandicapHists;
	}

	public void setDqHandicapHists(Set<DqHandicapHistTO> dqHandicapHists) {
		this.dqHandicapHists = dqHandicapHists;
	}

}